//
//  UIConstants.h
//  MoneyIndividual
//
//  Created by Le Anh Tai on 12/26/13.
//  Copyright (c) 2013 Le Anh Tai. All rights reserved.
//

//////////////////////////////////////////////////
#pragma mark - Font
#define FONT_BOLD(__x__) [UIFont boldSystemFontOfSize:__x__]
#define FONT(__x__) [UIFont systemFontOfSize:__x__]
#define FONT_HELVETICANEUE_BOLD(__x__) [UIFont fontWithName:@"HelveticaNeue-Bold" size:__x__]
#define FONT_HELVETICANEUE_ITALIC(__x__) [UIFont fontWithName:@"HelveticaNeue-Italic" size:__x__]
#define FONT_HELVETICANEUE(__x__) [UIFont fontWithName:@"HelveticaNeue" size:__x__]
#define FONT_HELVETICANEUE_CONDENSED_BOLD(__x__) [UIFont fontWithName:@"HelveticaNeue-CondensedBold" size:__x__]

#define FONT_SIZE_TITLE 18
#define FONT_SIZE_NORMAL 14
#define FONT_SIZE_DESCRIPTION 12

//////////////////////////////////////////////////
#pragma mark - Color
#define COLOR_HEX_ALPHA(rgbValue,alphaValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:alphaValue]

#define COLOR_HEX(rgbValue) COLOR_HEX_ALPHA(rgbValue,1)

#define COLOR(__r__, __g__, __b__, __a__)    [UIColor colorWithRed:__r__*1.0/255.0 green:__g__*1.0/255.0 blue:__b__*1.0/255.0 alpha:__a__*1.0]

//Colors
#define COLOR_GRAY_LIGHT COLOR(181, 181, 181, 1)
#define COLOR_GRAY_DARK COLOR(168, 171, 162, 1)
#define COLOR_WHITE_PURE [UIColor whiteColor]
#define COLOR_GRAY COLOR(142, 142, 147, 1)
#define COLOR_BLUE_IOS_7 COLOR_HEX(0x268EFF)
#define COLOR_BLUE_DARK COLOR(14, 102, 165, 1)
#define COLOR_BLUE_LIGHT_IOS_7 COLOR_HEX(0x3CAAFF)
#define COLOR_RED COLOR(254, 59, 49, 1)
#define COLOR_RED_DARK COLOR(162, 26, 57, 1)
#define COLOR_RED_PURE [UIColor redColor]
#define COLOR_GREEN COLOR(76, 217, 99, 1)
#define COLOR_GREEN_DARK COLOR(30, 147, 169, 1)
#define COLOR_BLACK_PURE [UIColor blackColor]
#define COLOR_ORANGE COLOR(254, 203, 46, 1)
#define CALLOUTVIEW_BACKGROUND_COLOR COLOR_HEX_ALPHA(0x000000,0.7)//0, 0, 0, 0.7)
#define CALLOUTVIEW_BORDER_COLOR COLOR_HEX(0xA7A7A7)//161, 167, 167, 1)

#define RADIAN(__degree__)  M_PI*__degree__/180

#define RECT(__x__, __y__, __w__, __h__) CGRectIntegral(CGRectMake(__x__, __y__, __w__, __h__))
#define RECT2(frame) CGRectIntegral(frame)

#define DEFAULT_ANIMATION_VECLOCITY 1400
#define SLIDING_SLOWEST_SPEED_TIME 0.4

//Dimension
#define SCREEN_SIZE [UIScreen mainScreen].bounds.size //point
#define HEI_HEADER_VIEW 44
#define HEI_STATUS_BAR 20

#define ANIMATE_DETAIL_WI 0.25f

#define MAX_LINES_OF_CHAT_MESSAGE 2
#define MAX_LINES_OF_TWEET_MESSAGE 4

#define ALPHA_DEFAULT_CELL 0.2
#define ALPHA_SELECTED_CELL 0.4
#define ALPHA_LAYER_CELL 0.4
#define ALPHA_SELECTEDLAYER_CELL 0.6
#define ALPHA_DEFAULT_TOOLBAR 0.2
